﻿namespace DesignPattern.com.strategy.demo {
    public abstract class ICharacterAttr {
        private float _maxHp;
        private float _nowHp;

        protected IStrategy _attrStra;

        public virtual void InitAttr(){
            _attrStra.InitAttr(this);
        }


        public float AtkPlus(){
            return _attrStra.AtkPlusValue(this);
            
        }

        public float RealDamage(ICharacterAttr attacker){
            return 1;
        }
        
        
        public IStrategy AttrStra {
            get { return _attrStra; }
            set { _attrStra = value; }
        }

        public float MaxHp {
            get { return _maxHp; }
            set { _maxHp = value; }
        }

        public float NowHp {
            get { return _nowHp; }
            set { _nowHp = value; }
        }
    }
}